﻿using Stock.Client.Utils;
using Stock.Dao;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

/// <summary>
/// 雪球
/// </summary>
namespace Stock.Client.Service
{
      public class Xueqiu_Service
      {
            /// <summary>
            /// 获取雪球数据
            /// </summary>
            public static Task<string> GetApiDataAsync()
            {
                  string url = ConfigurationManager.AppSettings["XUEQIU"].ToString();
                  //获取代码，并拼接
                  string doces = BaseDao.GetCodes();
                  if (string.IsNullOrEmpty(doces))
                  {
                        return Task.FromResult("");
                  }
                  //获取实时报价
                  Task<string> data = HttpUtils.GetSendAsync(url, doces);
                  //Task<string> data = HttpUtils.PostAsync("",url, doces);
                  return data;
            }
      }
}
